package br.com.fogas.medicao.activity;

import br.com.fogas.medicao.R;
import br.com.fogas.medicao.activity.helper.ConfiguracaoHelper;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

public class ConfiguracaoFragment extends Fragment {
	
	private ConfiguracaoHelper helper;
	
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
	}
	
	@Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
		View view = inflater.inflate(R.layout.configuracao, container, false);
        return view;
    }
	
	@Override
	public void onViewCreated(View view, Bundle savedInstanceState) {
		super.onViewCreated(view, savedInstanceState);
		this.helper = new ConfiguracaoHelper(getActivity(), getView());
	}
	
	@Override
	public void onResume() {
		super.onResume();
	}
	
	@Override
	public void onDestroyView() {
		super.onDestroyView();
		helper.getDatabase().fecharConexao();
	}
	
	public ConfiguracaoHelper getHelper() {
		return helper;
	}
}